<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="button" value="get请求" @click="getJokes">
        <input type="button" value="post请求">  
    </div>
    
    <script src="https:///unpkg.com/axios/dist/axios.min.js"></script>
    <script src="../js/vue.js"></script>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                joke: "很好笑的笑话"
            },
            methods: {
                getJokes: function() {
                    axios.get("https://autumnfish.cn/api/joke")
                        .then(res =>
                            (console.log(res)),
                            err=>
                            (console.log(err))
                        );
                }
            },
        });
    </script>
</body>
</html>